<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="${pageContext.request.contextPath }/">
    
    <title>My JSP 'MyJsp.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="ht/layui/css/layui.css"/>
	<script type="text/javascript" src="ht/layui/layui.js" ></script>
	<script type="text/javascript">
			layui.use(['form'], function(){
					 var form = layui.form
					  ,layer = layui.layer
					  , $ = layui.$ //jquery对象
					 
					//监听提交
					form.on('submit(btnEdit)', function(data){
					    var frm = $('#frm').serialize(); //获取表单数据
					    $.post('candidateInfoAction!editCand.action',frm,function(data){
					    	//data：-1 异常     1-成功
					    	if(data == -1){
					    		layer.msg('sorry,异常了......', {time: 3000 },function(){
					    			closeThis();
					    		});
					    	}else{
					    		layer.msg('面试者修改成功', {time: 3000 },function(){
					    			
					    			closeThis();
					    		});
					    	}
					    })
					    return false;
					}); 
					
					 
					//取消按钮
					$('#btnCancel').click(function(){
						closeThis();
					})
					 
			});
			
			//关闭当前窗口
			function closeThis(){
				
				var index = parent.layer.getFrameIndex(window.name);
				parent.layer.close(index);
				window.document.body.innerHTML = "";
			}
		</script>
  </head>
  
  <body>
		<div style="padding-top: 10px">
		    <center><h2>修改页面</h2></center>
			<form id="frm" class="layui-form" enctype="multipart/form-data">
				<input type="hidden" name="ci.candId" value="${queryId.candId }"/>
				<div class="layui-form-item">
				    <label class="layui-form-label">面试部门:</label>
				    <div class="layui-input-block" style="margin-right: 80px;">
					  <select name='ci.departId.departId' >
						<c:forEach items="${queryId }" var="queryId">
						   <option value="${queryId.departId.departId}">${queryId.departId.departName}</option>
						</c:forEach>
					  </select>
				    </div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">面试者姓名:</label>
				    <div class="layui-input-block" style="margin-right: 80px;">
				      <input type="text" name="ci.candName" lay-verify="required" autocomplete="off" class="layui-input" value="${queryId.candName }">
				    </div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">面试者年龄:</label>
				    <div class="layui-input-block" style="margin-right: 80px;">
				      <input type="text" name="ci.candAge" lay-verify="required"  autocomplete="off" class="layui-input" value="${queryId.candAge }">
				    </div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">面试者性别:</label>
				    <div class="layui-input-block" style="margin-right: 80px;">
				      <input name='ci.candSex' type='radio' id='para18'  lay-verify="required"  autocomplete="off" class="layui-input" value="${queryId.candSex }" checked='checked' />
					  <label for='para18'>男</label> 
					  <input name='ci.candSex' type='radio' id='para28'   lay-verify="required" autocomplete="off" class="layui-input" value="${queryId.candSex }" />
					  <label for='para28'>女</label> 
				    </div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">期望工资:</label>
				    <div class="layui-input-block" style="margin-right: 80px;">
				      <input type="text" name="ci.candSalary" lay-verify="required"  autocomplete="off" class="layui-input" value="${queryId.candSalary }">
				    </div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">联系电话:</label>
				    <div class="layui-input-block" style="margin-right: 80px;">
				      <input type="text" name="ci.candPhone" lay-verify="required"   autocomplete="off" class="layui-input" value="${queryId.candPhone }">
				    </div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">面试状态:</label>
				    <div class="layui-input-block" style="margin-right: 80px;">
				      <input name='ci.candState' type='radio' id='para18'  lay-verify="required"  autocomplete="off" class="layui-input" value="0" ${queryId.candState==0?'checked':'' } />
					  <label for='para18'>待审核</label> 
					  <input name='ci.candState' type='radio' id='para18'   lay-verify="required" autocomplete="off" class="layui-input" value="1" ${queryId.candState==1?'checked':'' }/>
					  <label for='para28'>未通过</label>
 				      <input name='ci.candState' type='radio' id='para18'   lay-verify="required" autocomplete="off" class="layui-input" value="2" ${queryId.candState==2?'checked':'' }/>
					  <label for='para28'>已通过</label>
				    </div>
				</div>
				<div class="layui-form-item layui-form-text">
				    <label class="layui-form-label">面试地址:</label>
				    <div class="layui-input-block">
				      <textarea name="ci.candAddress"  class="layui-textarea" >${queryId.candAddress }</textarea>
				    </div>
				 </div>
				 <div class="layui-form-item layui-form-text">
				    <label class="layui-form-label">备注说明:</label>
				    <div class="layui-input-block">
				      <textarea name="ci.candRemark" class="layui-textarea" >${queryId.candRemark }</textarea>
				    </div>
				 </div>
				<div class="layui-form-item" style="margin: 0 0px;text-align: right;">
				      <center><button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="btnEdit">编  辑</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				      <button class="layui-btn layui-btn-danger" style="margin-right: 10px" id="btnCancel">取  消</button></center>
				</div>
			</form>
		</div>
  </body>
</html>
